const EventEmitter = require('events');

let myEmitter = new EventEmitter();
/* 事件 */
myEmitter.on('xxx',(a,b) => {
    console.log('事件触发了！！！');
    console.log('a ---->',a);
    console.log('b ---->',b);
})
/* 执行 并传参数*/
myEmitter.emit('xxx',66,{name: 'six'});